\(\int \cot (a+b x) \csc (a+b x) \, dx\) [139]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 13, antiderivative size = 11 \[ \int \cot (a+b x) \csc (a+b x) \, dx=-\frac {\csc (a+b x)}{b} \]

[Out]

-csc(b*x+a)/b

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 11, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {2686, 8} \[ \int \cot (a+b x) \csc (a+b x) \, dx=-\frac {\csc (a+b x)}{b} \]

[In]

Int[Cot[a + b*x]*Csc[a + b*x],x]

[Out]

-(Csc[a + b*x]/b)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2686

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a/f, Subst[
Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n -
1)/2] &&  !(IntegerQ[m/2] && LtQ[0, m, n + 1])

Rubi steps \begin{align*} \text {integral}& = -\frac {\text {Subst}(\int 1 \, dx,x,\csc (a+b x))}{b} \\ & = -\frac {\csc (a+b x)}{b} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 11, normalized size of antiderivative = 1.00 \[ \int \cot (a+b x) \csc (a+b x) \, dx=-\frac {\csc (a+b x)}{b} \]

[In]

Integrate[Cot[a + b*x]*Csc[a + b*x],x]

[Out]

-(Csc[a + b*x]/b)

Maple [A] (verified)

Time = 0.03 (sec) , antiderivative size = 14, normalized size of antiderivative = 1.27

method result size
derivativedivides \(-\frac {1}{\sin \left (b x +a \right ) b}\) \(14\)
default \(-\frac {1}{\sin \left (b x +a \right ) b}\) \(14\)
parallelrisch \(-\frac {\sec \left (\frac {b x}{2}+\frac {a}{2}\right ) \csc \left (\frac {b x}{2}+\frac {a}{2}\right )}{2 b}\) \(24\)
risch \(-\frac {2 i {\mathrm e}^{i \left (b x +a \right )}}{b \left ({\mathrm e}^{2 i \left (b x +a \right )}-1\right )}\) \(29\)
norman \(\frac {-\frac {1}{2 b}-\frac {\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )}{2 b}}{\tan \left (\frac {b x}{2}+\frac {a}{2}\right )}\) \(35\)

[In]

int(cos(b*x+a)/sin(b*x+a)^2,x,method=_RETURNVERBOSE)

[Out]

-1/sin(b*x+a)/b

Fricas [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 13, normalized size of antiderivative = 1.18 \[ \int \cot (a+b x) \csc (a+b x) \, dx=-\frac {1}{b \sin \left (b x + a\right )} \]

[In]

integrate(cos(b*x+a)/sin(b*x+a)^2,x, algorithm="fricas")

[Out]

-1/(b*sin(b*x + a))

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 20 vs. \(2 (8) = 16\).

Time = 0.31 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.82 \[ \int \cot (a+b x) \csc (a+b x) \, dx=\begin {cases} - \frac {1}{b \sin {\left (a + b x \right )}} & \text {for}\: b \neq 0 \\\frac {x \cos {\left (a \right )}}{\sin ^{2}{\left (a \right )}} & \text {otherwise} \end {cases} \]

[In]

integrate(cos(b*x+a)/sin(b*x+a)**2,x)

[Out]

Piecewise((-1/(b*sin(a + b*x)), Ne(b, 0)), (x*cos(a)/sin(a)**2, True))

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 13, normalized size of antiderivative = 1.18 \[ \int \cot (a+b x) \csc (a+b x) \, dx=-\frac {1}{b \sin \left (b x + a\right )} \]

[In]

integrate(cos(b*x+a)/sin(b*x+a)^2,x, algorithm="maxima")

[Out]

-1/(b*sin(b*x + a))

Giac [A] (verification not implemented)

none

Time = 0.35 (sec) , antiderivative size = 13, normalized size of antiderivative = 1.18 \[ \int \cot (a+b x) \csc (a+b x) \, dx=-\frac {1}{b \sin \left (b x + a\right )} \]

[In]

integrate(cos(b*x+a)/sin(b*x+a)^2,x, algorithm="giac")

[Out]

-1/(b*sin(b*x + a))

Mupad [B] (verification not implemented)

Time = 0.16 (sec) , antiderivative size = 13, normalized size of antiderivative = 1.18 \[ \int \cot (a+b x) \csc (a+b x) \, dx=-\frac {1}{b\,\sin \left (a+b\,x\right )} \]

[In]

int(cos(a + b*x)/sin(a + b*x)^2,x)

[Out]

-1/(b*sin(a + b*x))